﻿Imports System.Collections.Generic
Imports System.Globalization
Imports System.Text
Imports System

Public Class CommonLibrary

    Private culInfo As CultureInfo

    Public Delegate Sub CultureInfoChanshandler(ByVal sender As Object, ByVal e As EventArgs)

    Public Event OnCultureInfoChanges As CultureInfoChanshandler

    Public Sub New()
        culInfo = CultureInfo.CurrentCulture
    End Sub

    Public Function getCultureinfo() As CultureInfo
        Return culInfo
    End Function

    Public Function ChangeCultureInfo(ByVal culturename As String) As CultureInfo
        If culturename <> culInfo.Name Then
            culInfo = CultureInfo.CreateSpecificCulture(culturename)
            RaiseEvent OnCultureInfoChanges(Me, Nothing)
        End If
        Return culInfo
    End Function
End Class
